<!DOCTYPE html>
<html lang="en">
    <head>
        {include file="public/header"}
        <script type="text/javascript">

        </script>
    </head>
    <body>
        <div class="col-lg-12 col-sm-12">
            <form id="form" class="form" role="form" action="update" method="post">
                <input class="form-control" type="hidden" name="chid" value="{$data.ch_id}">
                <div class="form-group">
                    <div class="col-lg-3">
                        <label>选择试卷</label>
                        <select class="form-control" name="pid">
                            {volist name="paper" id="v"}
                            <option value="{$v.pap_id}">{$v.pap_name}</option>
                            {/volist}
                        </select>
                    </div>
                    <div class="col-lg-9">
                        <div class="choice" id="choice">
                            <p>
                                <label>题目名称:</label>
                                <input class="form-control" type="text" name="title" value="{$data.ch_title}">
                            </p>
                            <p>
                                <label>题目答案:</label>
                                <div class="answer-warp">
                                    <div class="answer-input" id="answer">
                                        {php} $sort = ['A','B','C','D','E']; {/php}
                                        {volist name="data.value" id="vo"}
                                        <div class="input-group">

                                            <span class="input-group-addon">
                                                <input type="checkbox" name="result[]" {$vo.check} value="{$key}">
                                            </span>
                                            <span class="input-group-addon">{$sort[$key]}</span>
                                            <input type="text" class="form-control" name="options[]"  value="{$vo.option}">
                                        </div>
                                        {/volist}
                                    </div>                                            
                                </div>
                                <div class="margin-top-10" style="margin-top:10px;">
                                    <a href="javascript:;" id="minus" class="btn btn-primary"><span class="fa fa-minus"></span></a>
                                    <a href="javascript:;" id="plus" class="btn btn-primary"><span class="fa fa-plus"></span></a>
                                </div>
                            </p>
                        </div>
                        <p>
                            <a href="javascript:;" class="btn btn-primary" onclick="edu.submit('form',this)">确定</a>
                        </p>
                    </div>
                </div>
            </form>
            <div class="clearfix"></div>
        </div>

        {include file="public/board"}
        {include file="public/javascript"}
        {include file="public/jqueryform"}
        <script type="text/javascript" src="/admin/script/choice/edit.js"></script>
        <script>
         var num = {php}echo count($data['value']);{/php}
        </script>
    </body>
</html>
